package com.chenbei.common.domain.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Schema(description = "树节点")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TreeNode<T> {

    @Schema(description = "节点ID")
    private Long id;

    @Schema(description = "父节点")
    private Long pid;

    @Schema(description = "节点名称")
    private String name;

    @Schema(description = "子节点列表")
    private List<TreeNode<T>> children;

    @Schema(description = "节点对应的原始数据")
    private T target;
}
